<?php

class Db_Tables2_BLogsMailSent
{
	var $title;
	var $contents;
	var $mail_address;
	
	function __construct() {
		$this->dealers_db = Zend_Registry::get("dealers_db");
	}
	
	function addRecord()
	{
		$result = FALSE;
		
		if($this->title && $this->contents && $this->mail_address)
		{
			$set = array(
				"title" => $this->title,
				"contents" => $this->contents,
				"mail_address" => $this->mail_address,
				"status" => 0,
				"ctime" => date("Y-m-d H:i:s")
			);
			
			if($this->dealers_db->insert("b_logs_mail_sent", $set))
			{
				$result = TRUE;
			}
		}
		
		return $result;
	}
}